package com.itheima.d4_print_stream;

import java.io.FileNotFoundException;
import java.io.PrintStream;

/**
 * 目标：了解下输出语句的重定向。
 */
public class PrintTest2 {
    public static void main(String[] args) throws FileNotFoundException {
        PrintStream ps = new PrintStream("day10io-app2/file/File05.txt");
        System.out.println("呵呵");

        System.setOut(ps);
        System.out.println("好好");
        System.out.println("喜喜");
        System.out.println("哈哈");

    }
}
